-- GENERATED SPELL FOR [Elder Mistvale Gorilla] --


function spell0_1557(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(61685,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1557', 4000, 1)
end

function spell1_1557(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1755,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1557', 0, 1)
end

function spell2_1557(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14919,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1557', 0, 1)
end

function spell3_1557(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14921,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1557', 0, 1)
end

function spell4_1557(pUnit, Event) --@Smack,n/a--
pUnit:FullCastSpellOnTarget(49971,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1557', 633, 1)
end

function Sorts_1557(pUnit, Event)
local choix_sorts_1557 = math.random(0, 4)
if choix_sorts_1557 == 0 then
pUnit:RegisterEvent('spell0_1557', 1, 1)
end
if choix_sorts_1557 == 1 then
pUnit:RegisterEvent('spell1_1557', 1, 1)
end
if choix_sorts_1557 == 2 then
pUnit:RegisterEvent('spell2_1557', 1, 1)
end
if choix_sorts_1557 == 3 then
pUnit:RegisterEvent('spell3_1557', 1, 1)
end
if choix_sorts_1557 == 4 then
pUnit:RegisterEvent('spell4_1557', 1, 1)
end
end

function mob1557_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1557', math.random(1500, 3000), 1)
end

function mob1557_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1557_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1557_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1557, 1, 'mob1557_Action')
RegisterUnitEvent(1557, 2, 'mob1557_Leave')
RegisterUnitEvent(1557, 3, 'mob1557_Kill')
RegisterUnitEvent(1557, 4, 'mob1557_Die')
